import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Movie from '../views/home/Movie'
import ShortVideo from '../views/home/ShortVideo'
import Video from '../views/home/Video'
import My from '../views/home/My'
import Performance from '../views/home/Performance'

// import HotShowing from '../views/home/movie/HotShowing'
const HotShowing =()=>import('../views/home/movie/HotShowing')

import Theater from '../views/home/movie/Theater'
import ComingSoon from '../views/home/movie/ComingSoon'
import ClassicMovie from '../views/home/movie/ClassicMovie'
import City from '../views/City'
import Search from '../views/Search'
import Detail from '../views/Detail'


Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: '/home/movie/hotshowing',
  },
  {
    path: '/home',
    component: Home,
    children: [
      {
        path: 'movie',
        component: Movie,
        meta:{order:0},
        redirect: '/home/movie/hotshowing',
        children:[
          {
            path:'hotshowing',
            component:HotShowing,
            meta:{order:1},
          },
          {
            path:'theater',
            component:Theater
          },
          {
            path:'coming-soon',
            component:ComingSoon
          },
          {
            path:'classic-movie',
            component:ClassicMovie
          },
          
        ]
      },
      {
        path: 'shortvideo',
        component: ShortVideo,
        meta:{order:3}
      },
      {
        path: 'video',
        component: Video,
        meta:{order:2}
      },
      {
        path: 'my',
        component: My,
        meta:{order:4}
      },
      {
        path: 'performance',
        component: Performance
      }
    ]
  },
  {
    path:'/city',
    component:City
  },{
    path:'/search',
    component:Search
  },
  {
    path:'/detail',
    name:'detail',
    component:Detail
  }

]







const router = new VueRouter({
  routes
})

export default router
